package view

import (
	"github.com/gin-gonic/gin"
	"vrcm/src/vrcm/app/admin/apis/view_manage"
	"vrcm/src/vrcm/app/admin/router"
	"vrcm/src/vrcm/common/middleware"
)

func init() {
	router.NoCheckRole = append(router.NoCheckRole, registerViewFitRouter)
}

// registerViewFitRouter
func registerViewFitRouter(v1 *gin.RouterGroup) {
	api := view_manage.ViewFit{}
	r := v1.Group("/view-fit").Use(middleware.Cors())
	{
		r.GET("", api.GetPage)
		r.GET("/:id", api.Get)
		r.POST("/get-by-bind-id", api.GetByBindId)
		r.POST("/insert", api.Insert)
		r.POST("/insert-or-update", api.Update)
		r.DELETE("", api.Delete)
		r.POST("/get-info", api.GetInfoByBindId)
	}
}
